import request from '@/utils/request'

// 查询物业费订单列表
export function listOrder(query) {
  return request({
    url: '/module/property/order/list',
    method: 'get',
    params: query
  })
}

// 查询物业费订单列表
export function listTaizhang(query) {
  return request({
    url: '/module/property/order/taizhang',
    method: 'get',
    params: query
  })
}

// 查询物业费订单详细
export function getOrder(id) {
  return request({
    url: '/module/property/order/' + id,
    method: 'get'
  })
}

// 查询物业费订单详细
export function queryOrder(id) {
  return request({
    url: '/module/property/order/queryOrder/' + id,
    method: 'get'
  })
}

// 订单退款
export function refundOrder(data) {
  return request({
    url: '/module/property/order/refundOrder',
    method: 'post',
    data
  })
}



// 查询物业费订单详细
export function sendWxMessage(id) {
  return request({
    url: '/module/wx/template/sendMsg/' + id,
    method: 'get'
  })
}



// 新增物业费订单
export function addOrder(data) {
  return request({
    url: '/module/property/order',
    method: 'post',
    data
  })
}

// 修改物业费订单
export function updateOrder(data) {
  return request({
    url: '/module/property/order',
    method: 'put',
    data
  })
}

// 修改物业费订单
export function updateOrderTime(data) {
  return request({
    url: '/module/property/order/editTime',
    method: 'put',
    data
  })
}

// 删除物业费订单
export function delOrder(id) {
  return request({
    url: '/module/property/order/' + id,
    method: 'delete'
  })
}

// 作废物业费订单
export function voidOrder(id) {
  return request({
    url: '/module/property/order/void/' + id,
    method: 'delete'
  })
}

// 导出物业费订单
export function exportOrder(query) {
  return request({
    url: '/module/property/order/export',
    method: 'get',
    params: query
  })
}
